package com.abc.cloud.dao;

import com.abc.cloud.entity.ChatDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 聊天记录表
 * 
 * @author LiJunXi
 * @email 2770063826@qq.com
 * @date 2023-11-29 13:17:40
 */
@Mapper
public interface ChatDetailDao extends BaseMapper<ChatDetailEntity> {

    void saveChatDetail(ChatDetailEntity chatDetailEntity);

    List<ChatDetailEntity> queryChatDetailUnreadById(@Param("chatId") Long chatId,
                                                     @Param("userId") Long userId,
                                                     @Param("isRead") Integer isRead);

    void deleteChatDetailByIds(@Param("list") List<Long> ids,
                               @Param("status") Integer status);
}
